﻿<style type="text/css">
    /*币种*/
    .mv-content{margin-top:0px;}
    .mv-list-top{position: fixed;top:0px;width:100%;left:0px;}
    .currency-top { text-align: center; line-height: 40px; border-bottom: 1px solid #f2f2f2; background: #313f68;color: #fff;padding-bottom: 10px;}
    .currency-top a i {font-size: 20px; margin-left: 5px; position: relative; top: 1px; overflow: hidden; color: #fff}
    .currency-top h2 {font-size: 18px; display: inline-block; color: #fff;} 
    .currency-top h2 span{font-weight: 700}
    .currency-top a {font-size: 16px; position: absolute; left: 0px; display: inline-block; height: 40px;color: #fff }
    .currency-top p{color: #fff;line-height: 35px;}
    .detail-a{font-size: 25px;padding-top: 20px;padding-bottom:10px;}
    .coin-top{border-bottom: 1px solid #f2f2f2;background:#fff;}
    .coin-top a{display: inline-block;width: 33.333%;text-align: center;padding-top: 10px;padding-bottom: 8px;font-size: 16px;}
    .mv-list{margin-top: 5px;overflow: hidden;}
    .list-left img{display: inline-block;height: 40px;}
    .coin-change{text-align: center;position: fixed;bottom: 0px;width: 100%;background: #f2f2f2;padding-top: 10px;padding-bottom: 10px;}
    .coin-change a{color: #fff;margin: 0 10px;display: inline-block;border-radius: 5px;width: 40%; padding:6px 0px; }
    .coin-change .change-a{background:#e7a068;}
    .coin-change .change-b{background: #43527f}
    /*高亮*/
    .nav-color{color: #3d678a;border-bottom: 1px solid #3d678a;}
</style>
<div class="mv-list-top">
    <div class="currency-top">
        <h2 v-text="bag.info.code">-</h2>
        <a v-on:click="back">
            <i class="iconfont icon-fanhui1"></i>
        </a>
        <div class="coin-detail">
            <p class="detail-a" v-text="bag.info.money">-</p>
            <p v-text="'≈ ¥ ' + bag.info.money * bag.info.price">-</p>
        </div>
    </div>
    <div class="coin-top">
        <a class="nav-color" v-on:click="choose($event,-1)">全部</a><a v-on:click="choose($event,1)">转入</a><a v-on:click="choose($event,2)">转出</a>
    </div>
</div>
<div class="mv-list-image" style="margin-top:200px;">
    <ul>
        <li v-for="data in bag.datas">
            <a v-on:click="detail(data.id,data.title)">
                <div class="list-content">
                    <div class="list-left">
                        <img :src="'/Images/Icons/stock_deal_'+data.type+'.png'">
                    </div>
                    <div class="list-right">
                        <div class="right-a">
                            <h2 v-text="data.title">-</h2>
                            <p class="price-plus" v-text="'['+data.accounttype+'-'+data.typename+']'">-</p>
                            <p class="list-time" v-text="data.addtime">-</p>
                        </div>
                        <div class="right-b price-plus" v-text="data.money">-</div>
                    </div>
                </div>
            </a>
        </li>
    </ul>
</div>
<div style="text-align:center;margin-top:0.5em;" v-if="bag.dataend == false">
    <a v-on:click="more" v-text="morename" style="color:#888;">-</a>
</div>
<div style="text-align:center;margin-top:0.5em;" v-if="bag.dataend == true">
    <a style="color:#aaa;">已显示所有</a>
</div>
<div class="coin-change">
    <a class="change-a" v-on:click="deposit">充币</a><a class="change-b" v-on:click="withdraw">提币</a>
</div>
<div style="height:60px;"></div>
<script type="text/javascript">
    var pagedata = {
        request: {
            method: "VIEW_USER_ASSETDETAIL",
            id: mview.view.chlid.param.id,
            page: 0,
            type: -1
        },
        screen: {
            header_display: false,
            header_title_name: "",
            header_exit_name: "",
            header_exit_click: function () { },
            footer_display: false,
            footer_choose: "user"
        },
        data: {
            morename: "查看更多"
        },
        methods: {
            deposit: function () {
                mview.view.load('/views/Stock/deposit.html', {
                    id: pagedata.request.id
                });
            },
            withdraw: function () {
                mview.view.load('/views/Stock/withdraw.html', {
                    id: pagedata.request.id
                });
            },
            choose: function (elm, type) {
                m.view.node(".coin-top a").removeClass("nav-color");
                m.view.node(elm.currentTarget).addClass("nav-color");
                pagedata.request.page = 0;
                pagedata.request.type = type;
                pagedata.reload();
            },
            detail: function (id, title) {
                mview.view.load('/views/Stock/dealdetail.html', {
                    id: id,
                    title: title
                });
            },
            back: function () {
                mview.view.back();
            },
            //加载更多
            more: function () {
                pagedata.request.page += 1;
                mview.socket.send({
                    data: {
                        method: "VIEW_USER_ASSETDETAIL",
                        id: mview.view.chlid.param.id,
                        page: pagedata.request.page,
                        type: pagedata.request.type,
                        part: 1
                    },
                    success: function (json) {
                        if (json.Code == 0 && json.Data.datas.length > 0) {
                            for (var i in json.Data.datas) {
                                var data = json.Data.datas[i];
                                mview.vue.stage.$data.bag.dataend = json.Data.dataend;
                                mview.vue.stage.$data.bag.datas.push(data);
                            }
                        }
                    }
                });
            }
        }
    }
    mview.view.chlid.init(pagedata);
</script>